/**
 * Copyright (c) 2013-2015, Jieven. All rights reserved.
 *
 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt
 * To use it on other terms please contact us at 1623736450@qq.com
 */
package com.eova.repair.model;

import java.util.List;

import com.eova.common.base.BaseModel;
import com.jfinal.plugin.activerecord.Db;

/**
 * 用户角色
 *
 * @author Jieven
 * @date 2014-9-10
 */
public class RRepairType extends BaseModel<RRepairType> {

	private static final long serialVersionUID = -1794335434198017392L;

	public static final RRepairType dao = new RRepairType();

	/**
	 * 删除
	 * @param r_brand_id 品牌id
	 * @return
	 */
	public Integer deleteByBid(Integer r_brand_id) {
		return Db.update("delete from r_repair_type where r_brand_id = ?", r_brand_id);
	}
	
	/**
	 * 删除
	 * @param r_model_id 活动id
	 * @return
	 */
	public Integer deleteByMid(Integer r_model_id) {
		return Db.update("delete from r_repair_type where r_model_id = ?", r_model_id);
	}
	
	public List<RRepairType> getRepairTypeList()
	{
		return dao.find("select * from r_repair_type ");
	}
}